﻿using System;
using System.Globalization;

namespace CRM.Models
{
    public class EuroMoney:IFormattable
    {
        private float myValue;

        public EuroMoney(float value)
        {
            myValue = value;
        }

        public string ToString(string format, IFormatProvider formatProvider)
        {
            if (format.Equals("euro"))
            {
                return myValue.ToString("c", CultureInfo.CreateSpecificCulture("fr-FR"));
            }
            else
            {
                return myValue.ToString(format, formatProvider);
            }
        }

       
    }

    
}